Field of the Invention
The invention relates to data compression, and, more particularly, to a method for the lossless data compression/decompression and a device thereof.
Description of the Related Art
With the development of the Internet, transmission of a greater amount of data between terminals, such as video data and photo data transmission, has become a common demand from users. In order to facilitate the transmission of a greater amount of data, the data transmitted between terminals will first be compressed to reduce the quantity of transmitted data.
The current data compression and decompression is performed by processors of terminals. However, the processors of the terminals need to handle a variety of tasks of the terminals, and the processing resources are limited. Thus, in cases where a processor uses most of the resources when dealing with other tasks, if it is desired to compress or decompress data, the remaining resources are not sufficient for the processor, so that the speed for compression and decompression becomes slower.
In addition, lossless data compression technology is provided. That is, no information is lost after the raw data is compressed. According to the lossless data compression, after decompression is performed, data which is exactly the same as the raw data is obtained. Since the information of the raw data can be kept complete, the lossless data compression becomes the mainstream of data compression technology.